import React from 'react'
import { Box, AutoRollComponent, NoData } from '$components';

function BasicInfo(props) {
    const { emergencyList } = props;

    const getContent = () => {
        return <div className='xfjy_data'>
            {emergencyList.xfjy?.map(item => <div className='xfjy_item'>
                <div className='_text'>
                    <div className='_row1'>
                        <span>救援队伍</span>
                        <span>负责人及电话</span>
                    </div>
                    <div className='_row2'>
                        <span>{item.teamName}</span>
                        <span>{item.leaderContactPhone.replace(/(\d{3})\d*(\d{4})/, "$1****$2")}</span>
                    </div>
                </div>
            </div>)}
        </div>
    }
    return <Box title={"消防救援队伍"}>
        {emergencyList?.xfjy?.length
            ? <AutoRollComponent canScroll={true} content={getContent()} divHeight={250} divId={`fire-left-top`} />
            : <NoData height={250} />
        }
    </Box>
}

export default BasicInfo;


